<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  <div id="app">
      <com-a>
          <template slot="header">
            <h1>我来组成头部</h1>
          </template>
          <template slot="main">
            <h1>我来组成身体</h1>
          </template>
          <template slot="footer">
            <h1>我来组成脚部</h1>
          </template>
      </com-a>
  </div>


  <template id="tmp">
      <div>
      <header>
          <slot name='header'></slot>
      </header>
      <main>
        <slot name='main'></slot>
      </main>
      <footer>
        <slot name='footer'></slot>
      </footer>
    </div>
  </template>
  <script src="./vue.js"></script>
  <script>
      const comA = {
          template: "#tmp"
      }

    var vm = new Vue({
      el:'#app',
      data:{
      },
      methods:{
      },
      components: {
          comA
      }
     });
  </script>
</body>
</html>
